<%@page pageEncoding="utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<base href="/beadhouse/">
		<link rel="stylesheet" href="about/css/bootstrap.min.css">
		<link href="about/css/myCss.css" type="text/css" rel="stylesheet">
		<link href="about/css/main.css" type="text/css" rel="stylesheet">
		<link href="about/css/base.css" type="text/css" rel="stylesheet">
		<!--按钮样式表-->
		<link href="about/css/btn.css" type="text/css" rel="stylesheet">
		<link href="about/css/css.css" type="text/css" rel="stylesheet">
		<link href="about/css/index.css" type="text/css" rel="stylesheet">
		<link href="about/css/search.css" type="text/css" rel="stylesheet">
		<script src="about/js/jquery.min.js"></script>
		<script src="about/js/bootstrap.min.js"></script>
		
		<title>护理级别</title>
		<script type="text/javascript">
			function Values(id){
				$("#id").val(id);
				var url="/beadhouse/api/nurlevel/select";
				$.post(url,{levelId:id},function(r){
					if(r.code==="ok"){
						$("#nurLevelName").val(r.data.levelName);
						$("#nurLevelRemarks").val(r.data.remarks);
						
					}
				});
			}
			
		</script>
	</head>
	<body>
	<form action="/beadhouse/api/nurlevel/update" method="get">
			<div class="modal fade myModal2" id="Revert">
					<div class="modal-dialog">
					<input type="hidden" id="id" name="id" value="">
						<div class="modal-content" style="width:100%;">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close">
									<span aria-hidden="true">&times;</span>
								</button>
								<span class="glyphicon glyphicon-pencil"></span>&nbsp;【修改护理级别】
							</div>
							<div class="modal-body clearfix" style="height: auto;">
								<div class="col-md-12 pd0">
									<div class="col-md-1 pd0 mt10"></div>
									<div class="col-md-10 pd0">
										<div class="col-md-12 pd0">
											<div class="input-group inputWidth">
												<span class="input-group-addon titleWidth">&nbsp;&nbsp;名称：</span>
												<input  id="nurLevelName" type="text"  name="levelName" class="form-control" placeholder="请输入【名称】信息" aria-describedby="basic-addon1">
											</div>
										</div>
									</div>
									<div class="col-md-1 pd0"></div>
								</div>
								<div class="col-md-12 pd0 mt10">
									<div class="col-md-1 pd0"></div>
									<div class="col-md-10 pd0">
										<div class="col-md-12 pd0">
											<div class="input-group inputWidth">
												<span class="input-group-addon titleWidth">&nbsp;&nbsp;状态：</span>
												<select class="form-control" name="levelStatus" >
													<option value="0" selected>启用</option>
													<option value="1">禁用</option>
												</select>
											</div>
										</div>
									</div>
									<div class="col-md-1 pd0"></div>
								</div>
								<div class="col-md-12 pd0 mt10">
									<div class="col-md-1 pd0"></div>
									<div class="col-md-10 pd0">
										<div class="col-md-12 pd0">
											<div class="input-group inputWidth">
												<span class="input-group-addon titleWidth">&nbsp;&nbsp;备注：</span>
												<input id="nurLevelRemarks" type="text" name="remarks" class="form-control" aria-describedby="basic-addon1">
											</div>
										</div>
									</div>
									<div class="col-md-1 pd0"></div>
								</div>
							</div>
							<div class="modal-footer mt20">
								<button type="submit"	class="btn btn-primary" >
									确定
								</button>
								<button type="button" class="btn btn-default" data-dismiss="modal">
									取消
								</button>
							</div>
						</div>
						
					</div>
				</div>		
	</form>
		<div id="hljb" class="hljb page">
			<div class="col-md-12 pd20 RightContentBody fmt10">
				<div class="col-md-3 pd0 fmt5">
				<form action="/beadhouse/api/nurlevel/selectList">
					<div class="input-group inputWidth_search" >
						<input type="text" class="form-control" placeholder="护理级别" name="key">
						<span class="input-group-addon"><button type="submit" >查询</button></span>
													
					</div>
				</form>	
				</div>
				<div class="col-md-9 pd0 fmt5">
					<button class="btn btn-primary" data-toggle="modal" data-target=".myModal1"><span class="glyphicon glyphicon-plus"></span>&nbsp;添加</button> 
				</div>	
				<form action="/beadhouse/api/nurlevel/add" method="get">		
				<div class="modal fade myModal1">
					<div class="modal-dialog">
					
						<div class="modal-content" style="width:100%;">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close">
									<span aria-hidden="true">&times;</span>
								</button>
								<span class="glyphicon glyphicon-pencil"></span>&nbsp;【添加护理级别】
							</div>
							<div class="modal-body clearfix" style="height: auto;">
								<div class="col-md-12 pd0">
									<div class="col-md-1 pd0 mt10"></div>
									<div class="col-md-10 pd0">
										<div class="col-md-12 pd0">
											<div class="input-group inputWidth">
												<span class="input-group-addon titleWidth">&nbsp;&nbsp;名称：</span>
												<input type="text"  name="levelName" class="form-control" placeholder="请输入【名称】信息" aria-describedby="basic-addon1">
											</div>
										</div>
									</div>
									<div class="col-md-1 pd0"></div>
								</div>
								<div class="col-md-12 pd0 mt10">
									<div class="col-md-1 pd0"></div>
									<div class="col-md-10 pd0">
										<div class="col-md-12 pd0">
											<div class="input-group inputWidth">
												<span class="input-group-addon titleWidth">&nbsp;&nbsp;状态：</span>
												<select class="form-control" name="levelStatus" >
													<option value="0">启用</option>
													<option value="1">禁用</option>
												</select>
											</div>
										</div>
									</div>
									<div class="col-md-1 pd0"></div>
								</div>
								<div class="col-md-12 pd0 mt10">
									<div class="col-md-1 pd0"></div>
									<div class="col-md-10 pd0">
										<div class="col-md-12 pd0">
											<div class="input-group inputWidth">
												<span class="input-group-addon titleWidth">&nbsp;&nbsp;备注：</span>
												<input type="text" name="remarks" class="form-control" aria-describedby="basic-addon1">
											</div>
										</div>
									</div>
									<div class="col-md-1 pd0"></div>
								</div>
							</div>
							<div class="modal-footer mt20">
								<button type="submit"	 class="btn btn-primary" >
									确定
								</button>
								<button type="button" class="btn btn-default" data-dismiss="modal">
									取消
								</button>
							</div>
						</div>
						
					</div>
				</div>
				</form>
				<div class="col-md-12 pd0 fmt10">
					<hr class="commonHRCss"/>
				</div>
				<div class="col-md-12 pd0">
					<table class="table table-hover">
						<thead>
							<tr>
								<th>序号</th>
								<th>护理级别</th>
								<th>状态</th>
								<th>备注</th>
								<th>操作</th>
							</tr>
						</thead>
						
						 <c:forEach items="${data.rows}"  var="r" varStatus="vs">
								<tr>
									<td>${vs.index}</td>
									<td>${data.rows[vs.index].levelName}</td>
					
									<c:if test="${data.rows[vs.index].levelStatus==0}">
									<td>启用</td>
									</c:if>
									<c:if test="${data.rows[vs.index].levelStatus==1}">
									<td>禁用</td>
									</c:if>
									
									<td>${data.rows[vs.index].remarks}</td>
									<td>
							
									<button id="Revert" href=""  target="mainFrame" class="btn btn-primary" data-toggle="modal" data-target=".myModal2" onclick="Values(${data.rows[vs.index].id})">修改</button>
									
									<a href="/beadhouse/api/nurlevel/delete?levelId=${data.rows[vs.index].id}" target="mainFrame">
										<button class="btn btn-danger">删除</button>
									</a>
									<a href="/beadhouse/api/nurlevel/content/select?id=${data.rows[vs.index].id}#${data.rows[vs.index].id}" target="mainFrame">
										<button class="btn btn-success">护理内容配置</button>
									</a>
								</td>
								</tr>
								</c:forEach> 
					</table>
				</div>
				<div class="col-md-12 pd0">
					<div class="col-md-12 text-right pd0 fmt20">
						<nav aria-label="Page navigation">
							<ul class="pagination">
							
								<li>
									<a href="/beadhouse/api/nurlevel/selectList?pageNum=${data.pageNo-1}" aria-label="Previous">
										<span aria-hidden="true">&laquo;</span>
									</a>
								</li>
									<c:forEach items="${data.rows}" var="r" varStatus="vs" begin="1" end="${data.totalPages}">
								<li><a href="/beadhouse/api/nurlevel/selectList?pageNum=${vs.index}">${vs.count}</a></li>
								
								</c:forEach> 
								<li>
									<a href="/beadhouse/api/nurlevel/selectList?pageNum=${data.pageNo+1}" aria-label="Next">
										<span aria-hidden="true">&raquo;</span>
									</a>
								</li>
							
							</ul>
						</nav>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>

